import myaxios from '../MyAxios';
import BASEURL from '@/http/BaseUrl';
var BMDURL = BASEURL.BMDURL

const serveApi = {
    /**
     * @param {obj} params {id:4}
     */
    queryIcon(params){
        let url = BMDURL + '/serve/serve-icon'
        return myaxios.get(url,params)
    },

    /** 查询热门 
     * @param {obj} params {hot:1}
     */
    queryHotClass(params){
        let url = BMDURL + '/serve/serve-hot'
        return myaxios.get(url,params)
    },

    /** 
     * 查询大类所有商品
     */
     queryBigClassList(){
        let url = BMDURL + '/serve/bg-class'
        return myaxios.get(url)
    },

     /** 通过id查询当前小类 
     * @param {obj} params {sbid:2}
     */
      queryIdThisClass(params){
        let url = BMDURL + '/serve/sm-class'
        return myaxios.get(url,params)
    },

     /** 查询小类商品数据
     * @param {obj} params {sid:4}
     */
     queryIdSmallClassList(params){
        let url = BMDURL + '/serve/serve-class'
        return myaxios.get(url,params)
    },

    /** 查询小类商品推荐数据
     * @param {obj} params {id:4}
     */
    queryIdSmallShopList(params){
        let url = BMDURL + '/serve/serve-page'
        return myaxios.get(url,params)
    },
    /**
     * QQ写的
     * @param {*} params 
     * @returns 
     */
    queryAll(){
        let url=BMDURL + '/serve/serve-num'
        return myaxios.get(url)
    },
    /**
     * @param {obj} params {value}   
     */
    selectValueByName(params){
        let url = BMDURL + '/serve/serve-select'
        return myaxios.get(url,params)
    }

}

export default serveApi